<template>
  <el-menu
    :default-openeds="[]"
    default-active="/home/account"
    style="min-height: 100%; overflow-x: hidden; overflow-y: hidden"
    background-color="rgb(48, 65, 86)"
    text-color="#fff"
    active-text-color="#ffd04b"
    :collapse-transition="false"
    :collapse="isCollapse"
    router
    @select="handleSelect"
  >
    <div style="height: 60px; line-height: 60px; text-align: center">
      <img
        src="../assets/logo.png"
        alt=""
        style="width: 20px; position: relative; top: 5px; right: 5px"
      />
      <b style="color: white" v-show="logoTextShow">裁判文书上网管理系统</b>
    </div>
    <el-menu-item
      :index="'/home/' + item.url"
      v-for="item in menu"
      :key="item.id"
    >
        <i :class="item.icon"></i>
        <span slot="title">{{item.menuName}}</span>
    </el-menu-item>
  </el-menu>
</template>

<script>

export default {
  name: 'AsideVue',
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean
  },
  data () {
    return {
    }
  },
  methods: {
    handleSelect (index) {
      // console.log(index)
      // console.log(this.$router.options.routes)
    }
  },
  computed: {
    menu: {
      get () {
        return this.$store.state.menu
      }
    }
  }
}
</script>

<style scoped>

</style>
